* 	This takes  file  with STATA results from event study -

*	manually aggregate ar files before that in sequence of RT Sputnik

drop _all

import delimited using ar.csv, delim(comma)

*95 % CI

*gen lbound=ave_abnormal_return-1.96*se
*gen ubound=ave_abnormal_return+1.96*se

*90 % CI


gen lbound=ave_abnormal_return-1.645*se
gen ubound=ave_abnormal_return+1.645*se


local outlets "RT Sputnik"

capture drop outlet

gen outlet=""

local i=0

forvalues j=1(7)8 {

local k=`j'+6

	local i=`i'+1
	local a: word `i' of `outlets'
	di "`i'"
	di "`a'"
	di "`j'"
	di "`k'"
	replace outlet="`a'" in `j'/`k'
		 	

}

capture drop n1

gen n1=_n

twoway rcapsym lbound ubound n1 in 1/7, aspectratio(.75) msymbol(oh) yline(0, lpattern(shortdash) lcolor(gr10)) yscale(range(-2 2)) ylabel(-2(1)2, labsize(medium)) xlabel(1 "HH" 2 "HB" 3 "BW" 4 "MV" 5 "SL" 6 "DE" 7 "BY", labsize(medium) nogrid notick) xscale(lcolor(white)) xtitle("") graphregion(color(white)) title("RT") ytitle("") || scatter ave* n1 in 1/7,  msymbol(smcircle) mcolor(navy) legend(off) saving(ref_es1, replace)
twoway rcapsym lbound ubound n1 in 8/14, aspectratio(.75) msymbol(oh) yline(0, lpattern(shortdash) lcolor(gr10)) yscale(range(-2 2)) ylabel(-2(1)2, labsize(medium)) xlabel(8 "HH" 9 "HB" 10 "BW" 11 "MV" 12 "SL" 13 "DE" 14 "BY", labsize(medium) nogrid notick) xscale(lcolor(white)) xtitle("") graphregion(color(white)) title("Sputnik") ytitle("") || scatter ave* n1 in 8/14,  msymbol(smcircle) mcolor(navy) legend(off) saving(ref_es2, replace)

gr combine ref_es1.gph ref_es2.gph, col(2) imargin(0.1 0.1) graphregion(color(white))

graph export "Figure4.pdf", replace
graph export "Figure5.png", replace
